    #ifndef RADARFORM_H
#define RADARFORM_H

#include <QWidget>
#include "utils/DemoduleUtil.h"
#include "utils/MutiSignalDecode.h"
#include <QWidget>
#include <QtCharts/QPieSeries>
#include <QScatterSeries>
#include <QMessageBox>
#include <QtCharts>
#include <QtCharts/QChartView>
#include <QtCharts/QChart>
#include <QtCharts/QLegend>
#include <QtCharts/QPieSeries>
#include <QtCharts/QPieSlice>
#include <QtCore/QTime>
#include <QtWidgets/QGridLayout>
#include <QtCharts/QScatterSeries>
#include "utils/SerialUtil.h"
#include "utils/DemoduleUtil.h"
#include <QStandardItemModel>
#include <QDateTime>

extern DemoduleUtil *demoduleUtil;
extern MutiSignalDecode *mutiSignalDecode;

namespace Ui {
class RadarForm;
}

QT_CHARTS_USE_NAMESPACE
class RadarForm : public QWidget
{
    Q_OBJECT

public:
    explicit RadarForm(QWidget *parent = nullptr);
    ~RadarForm();
    float angle[3] = {0,0,0};
    void staticAndDynamicData(QByteArray decData);
    void read_Excel();
    void clearPlainText();
    void setPlainText(int hzType);
    int dyInfo = 0;

private slots:
    void acceptDecodeData(QString decData,int hzType);

private:
    Ui::RadarForm *ui;
    void paintEvent(QPaintEvent *event);
    void figureDrillPosition (double courseAngle, double pitchAngle, double drillLength);
    int xPos = 0;
    //散点图
    QScatterSeries* series1;
    QScatterSeries* series5;
    QChart* chart1;
    QValueAxis *axisX1, *axisY1;
    QChartView *chartView1;

    QScatterSeries * series6;
    QScatterSeries * series7;
    QChart* chart4;
    QValueAxis *axisX2, *axisY2;
    QChartView *chartView2;

    //雷达图
    QPolarChart* chart2;
    QValueAxis* angularAxis2;
    QValueAxis* radialAxis2;
    QChartView *charview2;
    QSplineSeries *series2;

    QPolarChart* chart3;
    QValueAxis* angularAxis3;
    QValueAxis* radialAxis3;
    QChartView *charview3;
    QSplineSeries *series3;
    QSplineSeries *series4;
    QSplineSeries *seriesCircle;


    double x_1 = 0, y_1 = 0 , z_1 = 0;
    double x_2 = 0, y_2 = 0 , z_2 = 0;
    FIFO_Dec fifoDec;
    FIFO_Dec_Byte fifoDecByte;
    Cout_Dec countDec;
    double CourseAngle_fy=0,PitchAngle_fy=0,RollAngle_fy=0; //航向角  俯仰角  工具面角
    double CourseAngle_fy_1=0,PitchAngle_fy_1=0,drillLength_1=0;
    double DrillLength = 0;

    QMap<int, QList<QString>> decodeStr;
    int count = 0;
};

#endif // RADARFORM_H
